package com.gengealogy.net.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gengealogy.net.dao.BabyDao;
import com.gengealogy.net.po.Baby;
import com.gengealogy.net.service.BabyService;


@Service("babyService")
@Transactional
public class BabyServiceImpl implements BabyService{

	@Autowired
	private BabyDao babyDao;
	

	public BabyDao getBabyDao() {
		return babyDao;
	}

	public void setBabyDao(BabyDao babyDao) {
		this.babyDao = babyDao;
	}

	@Override
	public List<Baby> findBaby(int baby_tree_id) {
		// TODO Auto-generated method stub
		return babyDao.findBaby(baby_tree_id);
	}

	@Override
	public int addBaby(Baby baby) {
		// TODO Auto-generated method stub
		return babyDao.addBaby(baby);
	}

	@Override
	public Baby getBabyById(int baby_tree_id) {
		// TODO Auto-generated method stub
		return babyDao.getBabyById(baby_tree_id);
	}

	@Override
	public int updateBaby(Baby baby) {
		// TODO Auto-generated method stub
		return babyDao.updateBaby(baby);
	}

	@Override
	public int deleteBaby(int baby_id) {
		// TODO Auto-generated method stub
		return babyDao.deleteBaby(baby_id);
	}


	
}
